#include "comm.hpp"
int main()
{
    int fd=open(FIFO_NAME,O_RDONLY);
    if(fd<0)exit(4);
    char buffer[SIZE]={0};
    ssize_t n=read(fd,buffer,sizeof(buffer));
    if(n<0)exit(5);
    else if(n==0)exit(6);
    else
    {
        buffer[n]='\0';
        std::cout<<buffer<<std::endl;
    }
    return 0;
}